import { post } from "./server.js";
let loginUrl = "api/v1/login"; //login url
let getTreeUrl = "/api/v1/getNavigationTree"; //获取左侧导航url
let getUserListUrl = "/api/v1/getUserList"; //获取用户列表url
let delUserUrl = "/api/v1/delUser"; //删除用户url

let addTreeUrl = "/api/v1/addTree"; //测试url
let editUserRoleUrl = "/api/v1/editUserRole"; //修改用户权限url

/**
 * 登录
 * @param data
 *
 * */
export const login = (data) => post(loginUrl, data);
let registeUrl = "api/v1/registe";
/**
 * 注册
 * @param data
 * **/
export const registe = (data) => post(registeUrl, data);
export const getTree = (data) => post(getTreeUrl, data);
export const addTree = () => post(addTreeUrl);
export const getUserList = (data) => post(getUserListUrl, data);
export const delUser = (data) => post(delUserUrl, data);
export const editUserRole = (data) => post(editUserRoleUrl, data);
